package com.gopay.common.cps.dao.cbrmb.impl;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.cbrmb.CbRmbBankAcctInfoDao;
import com.gopay.common.domain.cbrmb.CbRmbBankAcctInfo;

@Repository(value = "cbRmbBankAcctInfoDao")
public class CbRmbBankAcctInfoDaoImpl extends BaseDAOImpl<CbRmbBankAcctInfo, Serializable> implements CbRmbBankAcctInfoDao {

	@Override
	public List<CbRmbBankAcctInfo> findByCustId(String custId) {
		DetachedCriteria criteria = DetachedCriteria.forClass(CbRmbBankAcctInfo.class);
		criteria.add(Restrictions.eq("custId",custId));
		criteria.add(Restrictions.eq("delFlag","0"));
		return this.findByCriteria(criteria);
	}

}
